/*
 * @Description: 本单位、跨单位申请列表
 * @Author: Rfan
 * @Date: 2022-03-21 19:01:08
 * @LastEditTime: 2022-03-30 18:26:41
 */

import { useMemo } from 'react';
import { Input, Radio, Space, Tabs } from 'antd';
import ApplyTable from './ApplyTable';

const { TabPane } = Tabs;
const { Search } = Input;

const ApplyList = () => {
  /**
   * @description: tab栏右侧节点
   * @return {ReactElement} 节点
   */
  const slot = useMemo(() => {
    return (
      <div className="search-wrap">
        <Space>
          <Radio.Group defaultValue={1}>
            <Radio value={1}>全部</Radio>
            <Radio value={2}>草稿</Radio>
            <Radio value={3}>审批中</Radio>
            <Radio value={4}>已通过</Radio>
            <Radio value={4}>已过期</Radio>
            <Radio value={4}>不同意</Radio>
          </Radio.Group>
          <Search placeholder="input search text" style={{ width: 200 }} />
        </Space>
      </div>
    );
  }, []);

  return (
    <div>
      <Tabs defaultActiveKey="1" tabBarExtraContent={slot}>
        <TabPane tab="本单位申请" key="1">
          <ApplyTable />
        </TabPane>
        <TabPane tab="跨单位申请" key="2" disabled>
          Content of Tab Pane 2
        </TabPane>
      </Tabs>
    </div>
  );
};

export default ApplyList;
